﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Habito.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Habito Contruction Chemicals Company
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="background-image: url('../../Content/Images/centerbgblur_01.png'); width: 966px; height: 67px; background-position: top left; background-repeat: no-repeat;"></div>
    <div style="background-image: url('../../Content/Images/centerbgblur_02.png'); width: 966px; height: 69px; background-position: top left; background-repeat: no-repeat;"></div>
    <div style="background-image: url('../../Content/Images/centerbgblur_03.png'); width: 966px; height: 67px; background-position: top left; background-repeat: no-repeat;"></div>
    <div style="background-image: url('../../Content/Images/centerbgblur_04.png'); width: 966px; height: 64px; background-position: top left; background-repeat: no-repeat;"></div>
    <div style="background-image: url('../../Content/Images/centerbgblur_05.png'); width: 966px; height: 57px; background-position: top left; background-repeat: no-repeat;"></div>
    <div style="background-image: url('../../Content/Images/centerbgblur_06.png'); width: 966px; height: 53px; background-position: top left; background-repeat: no-repeat;"></div> 
    <div style="margin: auto; margin-top: 0px; padding-left: 0px; text-align: left;">
        <div class="indexHolder" style="margin-left: 0px;">
            <div style="width: 100%; text-align: center; font-size: 10pt; color: #006FA1">Latest
				References</div>
            <div>
                <%=ViewState["LatestReferences"]%>
            </div>
        </div>
        <div class="indexHolder" style="margin-left: 31px;">
            <div style="width: 100%; text-align: center; font-size: 10pt; color: #006FA1">New Products</div>
            <div>
                <%=ViewState["NewProducts"]%>
            </div>
        </div>
        <div class="indexHolder" style="margin-left: 31px;">
            <div style="width: 100%; text-align: center; font-size: 10pt; color: #006FA1">New Solutions</div>
            <div>
                <%=ViewState["NewSolutions"]%>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Content/Site.css" rel="stylesheet" type="text/css" />
    <link href="../Content/icon.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
    <script src="Scripts/common.js" type="text/javascript"></script>
    <link href="../Content/easyui.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.easyui.min.js"></script>
    <style type="text/css">
        #Products li { display: block; height: 40px; padding-left: 30px; line-height: 30px; background-image: url('../../Content/Images/homeLiBg.png'); background-position: left top; background-repeat: no-repeat; }
    </style>
    <script type="text/javascript">
        var origionContent = "";
        var Products;
        $(document).ready(function () {
            origionContent = $("#Descholder").html();
            $.ajax({
                type: "POST",
                cache: false,
                url: window.location.href + "?GetData=1",
                contentType: "application/json",
                success: function (data) {
                }
            });
            $.ajax({
                cache: false,
                url: window.location.href + "?GetProducts=1",
                success: function (data) {
                    data = $.evalJSON(data);
                    Products = data;
                    var html = "";
                    $(data).each(function (index, content) {
                        var temp = "<img dd='" + data[index].Description + "' alt=\'" + data[index].ProductName + "\' src=\'" + data[index].ImagePath + "\' style=\'height: 80px;padding-left:14px;\'  width=\'150px;\' xx='1' onmouseover=\'ShowDetail(\'" + data[index].ID + "\')\' onmouseout=\'ShowOrigion()\' />";
                        html += temp;
                    });
                    $("#newProductsDiv").html(html);
                    //$("[xx='1']").each(function (index, content) {
                    //    $("[xx='1']")[index].bind('mouseover', ShowOrigion);
                    //    $("[xx='1']")[index].bind('mouseover', ShowDetail($("[xx='1']")[index].attr('dd')));
                    //});
                }
            });
            $("[tt='1']").each(function (index, content) {
                $(this).bind('click', function () {
                    var id = $(this).attr("tt1");
                    location.href("Reference/Index.aspx?id=" + id);
                });
            });
            $("[tt='2']").each(function (index, content) {
                $(this).bind('click', function () {
                    var id = $(this).attr("tt1");
                    location.href("Products/Index.aspx?id=" + id);
                });
            });
            $("[tt='3']").each(function (index, content) {
                $(this).bind('click', function () {
                    var id = $(this).attr("tt1");
                    location.href("Solutions/Index.aspx?id=" + id);
                });
            });
        });
        function ShowDetail(desc) {
            $("#Descholder").html(desc);
        }
        function ShowOrigion() {
            $("#Descholder").html(origionContent);
        }
        function replaceBG(img) {

        }
    </script>
</asp:Content>
